<template>
	<view class="theme-page-bg padding-20 h100vh">
		<view class="bg-fixed"></view>
		<view class="m-t-20 border-r32 bg-w" style="position: relative;z-index: 2;">
			<TeamItem :dataItem="myTeamInfo" />
		</view>
		<ScrollView
			:contentHeight="contentHeight"
			class="bg-w m-t-20 border-r32"
		>
			<template #content>
				<block v-for="(item, index) in list" :key="index">
					<TeamItem :dataItem="item" />
				</block>
			</template>
		</ScrollView>
	</view>
</template>

<script setup lang="ts">
	import { ref } from 'vue';
	import type { Ref } from 'vue'
	import ScrollView from '@/components/accompany/scrollView/scrollView.vue';
	import TeamItem from '../components/teamItem/index.vue';
	
	import { onLoad } from '@dcloudio/uni-app';
	const contentHeight:Ref<number> = ref(0)	
	
	onLoad (() => {
		console.log('onLoad')
		let sysInfo = uni.getStorageSync('sysInfo')
		contentHeight.value = sysInfo.screenHeight - sysInfo.statusBarHeight - 44 - 384/sysInfo.devicePixelRatio
		console.log(contentHeight)
	})
	const myTeamInfo = ref({ avatar: 'https://img0.baidu.com/it/u=1385079478,4019721997&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
			teamName: '用户名称',
			commission: '6666.00',
			relevance: 33
		})
	const list = ref([
		
		{ avatar: 'https://img0.baidu.com/it/u=1385079478,4019721997&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
			teamName: '用户名称',
			commission: '6666.00',
			teamNum: '66',
			awardMoney: 66
		}
	])
</script>

<style lang="scss" scoped>
	.bg-fixed {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
		height: 190rpx;
		background-color: #3FA897;
	}
	.border-r32 {
		border-radius: 32rpx;
	}
</style>
